﻿using System;

namespace PtzControl.Models
{
    /// <summary>
    /// 云台指令
    /// </summary>
    public class PtzCommand
    {
        /// <summary>
        /// 类型
        /// </summary>
        public PtzType Type;

        /// <summary>
        /// 值
        /// </summary>
        public float Value;

        /// <summary>
        /// Json输出
        /// </summary>
        /// <returns></returns>
        public override string ToString()
        {

            return $"{{\"Type\":{Enum.GetName(typeof(PtzType), this.Type)},\"Value\":{this.Value}}}";
        }
    }

    /// <summary>
    /// 云台指令类型
    /// </summary>
    public enum PtzType
    {
        LEFT,
        LEFTUP,
        UP,
        RIGHTUP,
        RIGHT,
        RIGHTDOWN,
        DOWN,
        LEFTDOWN,
        ZOOM,
        APERTURE,
        FOCUS,
        SETPRESET,
        GOTOPRESET,
        SETHOME,
        GOTOHOME,
    }

}
